﻿using Inovout.Gui.Wpf.ViewModels;
using Inovout.Business;

namespace Inovout.Portal.Desktop.Workbenchs
{
    public abstract class BaseWorkbenchViewModel : BaseViewModel
    {
        public virtual string Title
        {
            get
            {
                if (activedWorkspace != null)
                {
                    return activedWorkspace.Title;
                }
                else
                {
                    return "Inovout";
                }
            }
        }

         private DomainViewModel activedWorkspace;
        public virtual DomainViewModel ActivedWorkspace
        {
            get { return activedWorkspace; }
            set
            {
                if (value != activedWorkspace)
                {
                    activedWorkspace = value;
                    OnPropertyChanged(() => ActivedWorkspace);
                    OnPropertyChanged(() => Title);

                }
            }
        }
    }
}
